function BuildTree(builds, doLinkClick) {
	var tree = new Ext.tree.TreePanel({
				rootVisible : false,
				layout : 'fit',
				border : false,
				split : true,
				autoScroll : true
			});
	var root = new Ext.tree.TreeNode({
				allowDrag : false,
				allowDrop : false
			});
	tree.setRootNode(root);
	
	function addTree(build,parents){
		var i = 0;
		for (i = 0; i < build.length; i++) {
			var pro = build[i];
			if (pro != null) {
				var node = new Ext.tree.TreeNode({
							id : pro[0],
							text : pro[1],
							iconCls : pro[2],
							allowDrag : false,
							allowDrop : false,
							listeners : {
								"click" : function(node, e) {
									doLinkClick(node.id);
								}
							}
						});
				if(pro[3] != null){
					addTree(pro[3],node);
				}
				parents.appendChild(node);
			}
		}
	}
	addTree(builds,root);
	return tree;
}